<template>
  <div>
    <el-row>
      <el-col :span="16">
        <el-card
          :body-style="{ padding: '0px' }"
          v-loading="isLoading"
        >
          <div>
            <img
              class="random-img"
              :src="imgUrl[0].url"
              alt="">
          </div>
          <div style="padding: 14px;">
            <span class="bg-random">{{ imgUrl[0].desc }}</span>
            <div class="bottom clearfix">
              <time class="time"></time>
              <el-button
                icon="el-icon-refresh"
                circle
                @click="randomNum"
              ></el-button>
            </div>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  name: "RandomSister",
  data() {
    return {
    }
  },
  computed: {
    ...mapState(["imgUrl"]),
  },
  created() {
    this.isLoading = false;
    this.randomNum();
  },
  methods: {
    ...mapActions(["randomNum"]),
  }
}
</script>

<style scoped lang="less">
.time {
  font-size: 13px;
  color: #999;
}

.bottom {
  margin-top: 13px;
  line-height: 12px;
}

.button {
  padding: 0;
  float: right;
}

.image {
  width: 100%;
  display: block;
}

.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}

.clearfix:after {
  clear: both
}
.random-btn {
  width: 30px;
}
.random-img {
  width: 100%;
}
.bg-random {
  display: inline-block;
  background-color: #2c62fe;
}
</style>